package com.gsj.system.controller;
import com.gsj.common.pojo.R;
import com.gsj.system.config.OperLog;
import com.gsj.system.pojo.LoginVo;
import com.gsj.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: clms-eighth
 * @description: 登录的控制层
 * @author: 刘守霖
 * @create: 2021-07-16 18:51
 **/

@RestController
@RequestMapping("system")
public class LoginController {
    @Autowired
    private UserService userService;
    @PostMapping("/login")
    @OperLog( title= "登录",operatorType ="0",business_type = "0")
    public R login(@RequestBody LoginVo loginVo){
        return userService.findByName(loginVo);
    }
}
